package pattern19.barbecue;

/**
 *
 * @author wdl
 */
public class EatBarbecue {
    public static void main(String[] args) {
        System.out.println("路边摊吃烧烤：");
        Barbecuer barbecuer=new Barbecuer();
        barbecuer.bakeMutton();
        barbecuer.bakeMutton();
        barbecuer.bakeMutton();
        barbecuer.bakeChickenWing();
        barbecuer.bakeMutton();
        barbecuer.bakeMutton();
        barbecuer.bakeMutton();
        barbecuer.bakeChickenWing();

        System.out.println("门店吃烤肉：");
        //开店前准备
        Barbecuer boy=new Barbecuer();
        BaseCommand bakeMuttonCommand1=new BakeMuttonCommand(boy);
        BaseCommand bakeMuttonCommand2=new BakeMuttonCommand(boy);
        BaseCommand bakeChickenWingCommand=new BakeChickenWingCommand(boy);

        Waiter girl=new Waiter();

        //开店营业，顾客点菜
        girl.setOrder(bakeMuttonCommand1);
        girl.setOrder(bakeMuttonCommand2);
        girl.setOrder(bakeChickenWingCommand);
        //完毕，一起通知烤肉师傅
        girl.notifyX();

    }
}
